// index.js
// 获取应用实例
import request from '../../utils/http.js'
const app = getApp()

Page({
  data: {
    cssType:1,
    isHuiYuan:1,//是否有会员卡：1没有会员卡，2有会员卡
    shenFen: 3, //1店铺主， 2店铺员工， 3店铺用户，4非本地用户
    touXiangUrl: 'https://insurancecard.oneplusyang.com/202211211518277613028017ac47bca829ceba588a3c5a.png',
    niCheng: '',
    txFlage:true,//设置头像提醒开关
    openid:'',
    othopenid:'o-N5c43yExEafP8nZeGAajboMBZc',
    IsLogin: false,
    token: '',
    phone: '',
    personId: 0,
    tjr_id: '',
    dianPuId: '',
    noticeFlag: true, //不是默认店铺提醒开关

    dianPuLeiXing: 6,

    // 佣金
    chakandisble: true, //资金数据是否隐藏

    zongYongJin: 0,
    daiFaFang: 0,


    daiShouHuoShou: 0,
    daiZhiFuShu: 0,
    daiFaHuoShu: 0,
    zhongChouDoing:0,

    version: '',
    verIndex:2,
    code: '',
    codeIsUse:false,
    zhongChouDoing:0,
    peiZhenDoing:0,

    //健康圈
    role:0,//0不是会员，1仅会员，2会员+工作人员，3 仅工作人员
    monthZong:0,
    monthFenHong:0,
    yiYaoQingRenShu:0,
    monthTuiJianJiang:0,
  },



  onLoad() {

    var that = this
    wx.login({
      success: res => {
        that.setData({
          code: res.code
        })
      }
    })
  },

  onShow: function () {
    if (typeof this.getTabBar === 'function' && this.getTabBar()) {
      this.getTabBar().setData({
        selected: 3
      })
    }

    this.setData({
      version: app.globalData.version,
      IsLogin: wx.getStorageSync(app.globalData.LOGINSTATUS),
      tjr_id: wx.getStorageSync(app.globalData.TJR_ID),
      dianPuId: wx.getStorageSync(app.globalData.SHOPID),
      verIndex: wx.getStorageSync(app.globalData.VerIndex), 
    })

    if (this.data.IsLogin) {
      this.setData({
        personId: wx.getStorageSync(app.globalData.PERSON_ID),
        chakandisble: wx.getStorageSync('chakandisble'),
        phone: wx.getStorageSync(app.globalData.PHONENUMBER),
        token: wx.getStorageSync(app.globalData.TOKEN),
        openid:wx.getStorageSync(app.globalData.OPENID),
        // niCheng:wx.getStorageSync(app.globalData.NiCheng),  
        // touXiangUrl:wx.getStorageSync(app.globalData.LOGINSTATUS)?wx.getStorageSync(app.globalData.TouXiang):this.data.touXiangUrl,  
      })


      this.getPerSimData(this.data.token)
      this.getHuiyuanInfo();
      this.getJKQInfo();//健康圈会员数据
      // this.testToken()
    } else {
      this.setData({
        niCheng: '登录/注册',
        touXiangUrl:'https://insurancecard.oneplusyang.com/202211211518277613028017ac47bca829ceba588a3c5a.png',
        shenFen:4,
        token: '',
        phone: '',
        personId: 0,
        isHuiYuan:1,
      })

      if(this.data.codeIsUse){
        var that = this
        wx.login({
          success: res => {
            that.setData({
              code: res.code
            })
          }
        })

      }
    }
  },


  //V3.0 获取手机号码
  getPhoneNumber: function (e) {
    var that = this
    if (e.detail.errMsg == "getPhoneNumber:ok") { //允许
      that.decryptPhone(e);
    } else { //拒绝
      wx.showToast({
        title: "请授权！！", // 提示的内容
        icon: "none", // 图标，默认success
        duration: 3000, // 提示的延迟时间，默认1500
        mask: false, // 是否显示透明蒙层，防止触摸穿透
      })
    }
  },

  //V3.0 解密手机号码
  decryptPhone: function (e) {

    wx.showLoading({
      title: '解析中...',
      mask: true
    })

    var that = this;
    let code = that.data.code;
    let iv = e.detail.iv;
    let encryptedData = e.detail.encryptedData;

    wx.request({
      url: app.globalData.base_url + 'resource/getWXPhoneDirect',
      data: {
        iv: iv,
        js_code: code,
        encrypted: encryptedData,
        tuiJianRenId: that.data.tjr_id,
        dianPuId: that.data.dianPuId
      },
      success: function (res) {
        // console.log("解密手机号码:" + JSON.stringify(res.data))
        wx.hideLoading();
        if (res.data.purePhoneNumber == '' || res.data.status == 500) {

          // wx.showModal({
          //   title: "解析异常！",
          //   content: "请点右上角‘重新进入小程序’重试",
          //   showCancel: false,
          //   success(res) {
          //     that.setData({
          //       codeIsUse:true
          //     })
          //   }
          // })

        
          wx.login({
            success: res => {
              that.setData({
                code: res.code
              })

              that.decryptPhone(e);
            }
          })


        } else {
          wx.setStorageSync(app.globalData.OPENID, res.data.openId)
          wx.setStorageSync(app.globalData.PERSON_ID, res.data.personId)
          wx.setStorageSync(app.globalData.TOKEN, res.data.token)
          wx.setStorageSync(app.globalData.PHONENUMBER, res.data.purePhoneNumber)
          wx.setStorageSync(app.globalData.LOGINSTATUS, true)
          wx.setStorageSync(app.globalData.NiCheng, res.data.niCheng)
          wx.setStorageSync(app.globalData.TouXiang, res.data.touXiangUrl)

          that.setData({
            phone: res.data.purePhoneNumber,
            token: res.data.token,
            personId: res.data.personId,
            touXiangUrl: res.data.touXiangUrl,
            niCheng: res.data.niCheng,
            IsLogin: true,
            codeIsUse:true,
            openid:res.data.openId
          })


          that.getPerSimData(res.data.token)
          that.syncData(res.data.token)
         
        }
      },
      fail: function (err) {
        wx.hideLoading();
        that.setData({
          IsLogin: false
        })
        wx.showToast({
          title: '获取数据失败,请检查网络', // 提示的内容
          icon: "none", // 图标，默认success
          duration: 3000, // 提示的延迟时间，默认1500
          mask: false, // 是否显示透明蒙层，防止触摸穿透
        })
      },
      complete: function (res) {
        
      }
    })
  },

  //V3.0 获取个人简单数据
  getPerSimData: function (token) {

    var that = this
    wx.request({
      url: app.globalData.base_url + '/dianPu/personInfo',
      header: {
        'token': token,
      },
      data:{
        dianPuId:that.data.dianPuId
      },
      success: function (res) {
        // console.log("个人简单数据:" + JSON.stringify(res.data))

        if(res.data.status==500||res.data.status==400){

          that.setData({
            IsLogin:false
          })
          wx.showToast({
            title: '获取数据失败!', // 提示的内容
            icon: "none", // 图标，默认success
            duration: 3000, // 提示的延迟时间，默认1500
            mask: false, // 是否显示透明蒙层，防止触摸穿透
          })

        }else{
        that.setData({
          touXiangUrl: res.data.touXiangUrl,
          niCheng: res.data.niCheng,
          zongYongJin: res.data.zongYongJin,
          daiFaFang: res.data.daiFaFang,
          shenFen: res.data.shenFen,
          daiShouHuoShou: res.data.daiShouHuoShou,
          daiZhiFuShu: res.data.daiZhiFuShu,
          daiFaHuoShu: res.data.daiFaHuoShu,
          dianPuLeiXing: res.data.dianPuLeiXing,
          zhongChouDoing:res.data.zhongChouDoing,
          peiZhenDoing:res.data.peiZhenDoing,
          cssType:res.data.zongYongJin>0||res.data.daiFaFang>0?2:1
        })


        let defaultDianPuId = res.data.defaultDianPuId
        //  console.log('defaultDianPuId:'+defaultDianPuId+'||dianPuId:'+that.data.dianPuId)
        if (that.data.dianPuId != defaultDianPuId && that.data.noticeFlag && defaultDianPuId>0) {



          wx.showModal({
            title: '温馨提示',
            content: '当前店铺不是默认店铺，是否切换到默认店铺？',
            confirmColor:'#00B4C4',
            cancelColor:'#696868',
            success(res) {
              if (res.confirm) {
                // console.log("defaultDianPuId:"+defaultDianPuId)
                app.globalData.shopIsChange = true
                wx.setStorageSync(app.globalData.SHOPID, defaultDianPuId);
                wx.switchTab({
                  url: '/pages/index/index?',
                })


              } else {
                that.setData({
                  noticeFlag: false
                })
              }
            }

          })


        }else{
        //提醒设置头像和昵称
            if(that.data.txFlage && (that.data.touXiangUrl==''||that.data.touXiangUrl==null||that.data.niCheng=='')){
     
              setTimeout(function () {
                wx.showModal({
                  title: '温馨提示',
                  content: '您的头像、昵称还未设置！',
                  confirmText:'去设置',
                  confirmColor:'#00B4C4',
                  cancelColor:'#696868',
                  success(res) {
                    if (res.confirm) {
                          that.updateTouxiang()
                    } else {
                      that.setData({
                        txFlage:false
                      })
                    }
                  }
      
                })

              }, 2000)
 
          }
        }

      }
      },
      fail: function (err) {
        that.setData({
          IsLogin: false
        })
        wx.showToast({
          title: '获取数据失败,请检查网络', // 提示的内容
          icon: "none", // 图标，默认success
          duration: 3000, // 提示的延迟时间，默认1500
          mask: false, // 是否显示透明蒙层，防止触摸穿透
        })
      },
      complete: function (res) {
        wx.hideLoading();
      }
    })
  },

  //登录同步健康数据
  syncData(token){

    var that = this

      wx.request({
        url: app.globalData.base_url + 'qiTa/tongBuJiuZhenRenAndGouMaiChanPin',
        header: {
          'token':token,  
        },
        success: function (res) {
          console.log("同步数据成功" )
        },
        fail: function (err) {
          console.log("同步数据失败" )
        },
        complete: function (res) {
          console.log("同步数据完成" )
          setTimeout(function () {
            that.getHuiyuanInfo();
          }, 3000)

          
        }
      })


  },

  //会员判断
  getHuiyuanInfo:function(){
    var that = this

    request.get('qiTa/getHuiYuanKaZhuangTai', null, res => {
      //  console.log("会员信息:" + JSON.stringify(res.data))
        that.setData({
          isHuiYuan:res.data.isHuiYuan,
        })

    }, err => {


      wx.showToast({
        title: '获取数据失败,请检查网络', // 提示的内容
        icon: "none", // 图标，默认success
        duration: 3000, // 提示的延迟时间，默认1500
        mask: false, // 是否显示透明蒙层，防止触摸穿透
      })

    }, complete => {
      wx.hideLoading()

    })
  },


  //健康圈会员数据
  getJKQInfo:function(){
    var that = this

    var data={
      dianPuId:that.data.dianPuId
    }

    request.get('yongJin/jianKangHuiShouYiYuCe', data, res => {
       console.log("健康圈会员数据:" + JSON.stringify(res.data))
        that.setData({
          role:res.data.role,
          monthZong:res.data.monthZong,
          monthFenHong:res.data.monthFenHong,
          yiYaoQingRenShu:res.data.yiYaoQingRenShu,
          monthTuiJianJiang:res.data.monthTuiJianJiang,
        })

    }, err => {


      wx.showToast({
        title: '获取数据失败,请检查网络', // 提示的内容
        icon: "none", // 图标，默认success
        duration: 3000, // 提示的延迟时间，默认1500
        mask: false, // 是否显示透明蒙层，防止触摸穿透
      })

    }, complete => {
      wx.hideLoading()

    })
  },


  // 模拟token
  testToken() {

    var that = this;
    wx.request({
      url: app.globalData.base_url + 'resource/muNiDengLu',
      data: {
        phone: '13950289363'
      },
      success: function (res) {
        console.log("模拟token:" + JSON.stringify(res.data))

        wx.setStorageSync(app.globalData.TOKEN, res.data.token)
      },
      fail: function (err) {
        that.setData({
          IsLogin: false
        })
        wx.showToast({
          title: '获取数据失败,请检查网络', // 提示的内容
          icon: "none", // 图标，默认success
          duration: 3000, // 提示的延迟时间，默认1500
          mask: false, // 是否显示透明蒙层，防止触摸穿透
        })
      },
      complete: function (res) {
        wx.hideLoading();
      }
    })
  },


  //点击昵称登录
  toLogin(e) {
    // 推荐使用wx.getUserProfile获取用户信息，开发者每次通过该接口获取用户个人信息均需用户确认，开发者妥善保管用户快速填写的头像昵称，避免重复弹窗
    var that = this;

    if (that.data.IsLogin) {
      that.updateTouxiang();
    }

  },


  //系统设置
  sysSet:function(){
    wx.navigateTo({
      url: '/pkg_wo/pages/sysSet/sysSet',
    })
  },

  //更新头像信息
  updateTouxiang: function () {
    var that = this

    if (that.data.IsLogin) { //已经登录 
      wx.navigateTo({
        url: '/pkg_wo/pages/perSet/perSet?personId=' + that.data.personId,
      })
    }
  },

  //地址管理，调微信接口
  setAderssTap: function () {

    if (wx.chooseAddress) {
      wx.chooseAddress({
        success: function (res) {

        },
        fail: function () {


          wx.openSetting({
            success: (res) => {
              if (res.authSetting["scope.address"]) { ////如果用户重新同意了授权
                wx.chooseAddress({
                  success: function (ress) {
                    // console.log(ress.userName)
                    //   console.log(ress.postalCode)
                    //   console.log(ress.provinceName)
                    //   console.log(ress.cityName)
                    //   console.log(ress.countyName)
                    //   console.log(ress.detailInfo)
                    //   console.log(ress.nationalCode)
                    //   console.log(ress.telNumber)
                  },
                })
              }
            }
          })
        }
      })
    } else {
      // console.log('当前微信版本不支持chooseAddress');
    }

  },

  //数据显示隐藏
  dataChakanAction: function () {
    var that = this
    that.setData({
      chakandisble: !that.data.chakandisble
    })
    wx.setStorageSync('chakandisble', that.data.chakandisble)
  },

  //客服
  bindCustomServer: function () {
    // wx.navigateTo({
    //   url: '/pkg_wo/pages/kefu/kefu',
    // })

    console.log("aaaaa"+this.data.openid)
    console.log("bbbb"+this.data.othopenid)
    wx.getSetting({
      success(auth){
        console.log(auth, 'auth')
        if(!auth.authSetting['scope.record']){
          wx.authorize({
            scope: 'scope.record',
            success(){

            }
          })

          if (!auth.authSetting['scope.camera']) {
            wx.authorize({
              scope: 'scope.camera',
              success(){
                wx.createVKSession({
                  track: {
                    plane: {
                      mode: 3,
                    },
                    version:'v2'
                  },
                })
              }
            })
          }
        }else{
          let that=this


          wx.setEnable1v1Chat({
            enable: true,
            complete: (c) => {
              // console.log('setEnable1v1Chat', c)
              wx.join1v1Chat({
               
                caller: {
                  nickname: '张三',
                  headImage: '',
                  openid: that.data.openid,
                },
                listener: {
                  nickname: '背影',
                  headImage: '',
                  openid: that.data.othopenid,
                },
                complete: (c) => {
                  console.log('join1v1Chat', c)
                },
              });
            }
          });

          

        }
      }
    })



    // if(this.data.IsLogin){
 
    // }

  },


  biunique() {
    wx.setEnable1v1Chat({
      enable: true,
      backgroundType:0,
      // ignoreSelfVersion: true,
      complete: (c) => {
        console.log('setEnable1v1Chat', c)
        wx.join1v1Chat({
          // ignoreSelfVersion: true,
          // ignoreTargetVersion: true,
          caller: {
            nickname: this.data.niCheng,
            headImage: this.data.touXiangUrl,
            openid: this.data.openid
          },
          listener: {
            nickname: this.data.niCheng,
            headImage: this.data.touXiangUrl,
            openid: this.data.othopenid
          },
          complete: (c) => {
            console.log('join1v1Chat', c)
          },
        });
      }
    });

  },



  wx1v1Chat(){
    let that=this
    wx.setEnable1v1Chat({
      enable: true,
      success: (res) => {
        console.log(res, 'res')
        wx.join1v1Chat({
          caller: {
            nickname: '张三',
            openid: that.data.openid,
          },
          listener: {
            nickname: '李四',
            openid: that.data.othopenid,
          },
        })
      },
      fail: (err) => {
        console.log(err)
      }
    })
  },


  //分红测算
  bindCesuan: function () {
    wx.navigateTo({
      url: '/pkg_index/pages/cesuan/cesuan?dianPuId='+this.data.dianPuId,
    })


  },


  /**
   * 银行卡设置
   */
  setCardTap: function () {
    if (this.data.IsLogin) {
      wx.navigateTo({
        url: '/pkg_wo/pages/yinhang/yinhangSet',
      })
    } else {
      wx.showToast({
        title: '请先登录！', // 提示的内容
        icon: "none", // 图标，默认success
        duration: 3000, // 提示的延迟时间，默认1500
        mask: false, // 是否显示透明蒙层，防止触摸穿透
      })
      // this.toLogin();
    }
  },


    /**
   * 健康宣传大使
   */
  toDashi: function () {
    if (this.data.IsLogin) {
      wx.navigateTo({
        url: '/pkg_wo/pages/dashi/dashi',
      })
    } else {
      wx.showToast({
        title: '请先登录！', // 提示的内容
        icon: "none", // 图标，默认success
        duration: 3000, // 提示的延迟时间，默认1500
        mask: false, // 是否显示透明蒙层，防止触摸穿透
      })
    }
  },


  /**
   * 已邀健康会员
   */
  toJianKangHY: function () {
    if (this.data.IsLogin) {
      wx.navigateTo({
        url: '/pkg_wo/pages/myPerList/myPerList',
      })
    } else {
      wx.showToast({
        title: '请先登录！', // 提示的内容
        icon: "none", // 图标，默认success
        duration: 3000, // 提示的延迟时间，默认1500
        mask: false, // 是否显示透明蒙层，防止触摸穿透
      })
    }
  },



  //发票管理
  setFaPiao: function () {


      // wx.showToast({
      //   title: '发票功能更新中，如您需要开票，请联系客服！', // 提示的内容
      //   icon: "none", // 图标，默认success
      //   duration: 3000, // 提示的延迟时间，默认1500
      //   mask: false, // 是否显示透明蒙层，防止触摸穿透
      // })


    if (this.data.IsLogin) {
      wx.navigateTo({
        url: '/pkg_wo/pages/faPiao/faPiao?personId=' + this.data.personId,
      })
    } else {
      wx.showToast({
        title: '请先登录！', // 提示的内容
        icon: "none", // 图标，默认success
        duration: 3000, // 提示的延迟时间，默认1500
        mask: false, // 是否显示透明蒙层，防止触摸穿透
      })
    }


  },

  //附近服务点
  toServicePoint: function () {

    wx.navigateTo({
      url: '/pkg_wo/pages/servicePoint/servicePoint',
    })

  },

  //分享
  bindShareTap: function () {
    if (this.data.IsLogin) {
      wx.navigateTo({
        url: '/pkg_wo/pages/share/share',
      })
    } else {
      wx.showToast({
        title: '请先登录！', // 提示的内容
        icon: "none", // 图标，默认success
        duration: 3000, // 提示的延迟时间，默认1500
        mask: false, // 是否显示透明蒙层，防止触摸穿透
      })
    }
  },


  //查看已邀请用户
  bindCanInvitendTap: function () {
    if (this.data.IsLogin) {
      wx.navigateTo({
        url: '/pkg_wo/pages/candidatesInvited/candidatesInvited?',
      })
    } else {
      wx.showToast({
        title: '请先登录！', // 提示的内容
        icon: "none", // 图标，默认success
        duration: 3000, // 提示的延迟时间，默认1500
        mask: false, // 是否显示透明蒙层，防止触摸穿透
      })
    }
  },

  //查看全部订单
  allOrdersTap: function (e) {
    if (this.data.IsLogin) {
      var index = e.currentTarget.dataset.index;
      wx.navigateTo({
        url: '/pkg_wo/pages/allOrders/allOrders?index=' + index,
      })
    } else {
      wx.showToast({
        title: '请先登录！', // 提示的内容
        icon: "none", // 图标，默认success
        duration: 3000, // 提示的延迟时间，默认1500
        mask: false, // 是否显示透明蒙层，防止触摸穿透
      })
    }
  },

  //查看众筹
  allRaiseTap: function (e) {
    if (this.data.IsLogin) {
      var index = e.currentTarget.dataset.index;
      wx.navigateTo({
        url: '/pkg_shop/pages/shopRaise/shopRaise?index=' + index+'&dianPuId='+this.data.dianPuId,
      })
    } else {
      wx.showToast({
        title: '请先登录！', // 提示的内容
        icon: "none", // 图标，默认success
        duration: 3000, // 提示的延迟时间，默认1500
        mask: false, // 是否显示透明蒙层，防止触摸穿透
      })
    }
  },




  //收益详情
  bindDetailTap: function () {
    if (this.data.IsLogin) {
      wx.navigateTo({
        url: '/pkg_wo/pages/shouyiPro/shouyiPro',
      })
    } else {
      wx.showToast({
        title: '请先登录！', // 提示的内容
        icon: "none", // 图标，默认success
        duration: 3000, // 提示的延迟时间，默认1500
        mask: false, // 是否显示透明蒙层，防止触摸穿透
      })
    }
  },


  //协议
  bindXieyiTap: function () {
    wx.navigateTo({
      url: '/pkg_wo/pages/xieyiInfo/xieyiInfo?leiXing=3',
    })
  },

  // 我的点评
  bindEvaluate: function() {
    wx.showToast({
      title: '功能开发中！', // 提示的内容
      icon: "none", // 图标，默认success
      duration: 3000, // 提示的延迟时间，默认1500
      mask: false, // 是否显示透明蒙层，防止触摸穿透
    })
  },

  bindDangan: function() {
    wx.showToast({
      title: '功能开发中！', // 提示的内容
      icon: "none", // 图标，默认success
      duration: 3000, // 提示的延迟时间，默认1500
      mask: false, // 是否显示透明蒙层，防止触摸穿透
    })
  },

  //店铺设置
  toShopSet: function () {
    wx.navigateTo({
      url: '/pkg_shop/pages/shopSet/shopSet',
    })
  },


  //产品筛选
  toProSet: function () {
    wx.navigateTo({
      url: '/pkg_shop/pages/shopProSet/shopProSet',
    })
  },


  //销售订单
  toShopOrders: function () {
    wx.navigateTo({
      url: '/pkg_shop/pages/shopOrders/shopOrders',
    })
  },

  //佣金比例设置
  toSaleRatio: function () {
    wx.navigateTo({
      url: '/pkg_shop/pages/salesRatio/salesRatio?dianPuId=' + this.data.dianPuId,
    })
  },

  //佣金明细
  toShopYJ: function () {
    wx.navigateTo({
      url: '/pkg_shop/pages/shopYj/shopYj',
    })
  },


  //员工
  toSetYG: function () {
    wx.navigateTo({
      url: '/pkg_shop/pages/shopYG/shopYG',
    })
  },


  //用户
  toSetUsers: function () {
    wx.navigateTo({
      url: '/pkg_shop/pages/shopUsers/shopUsers',
    })
  },


  //店铺数据
  toShopData: function () {
    wx.navigateTo({
      url: '/pkg_shop/pages/shopData/shopData',
    })
  },
//陪诊预约
  PzyuyueTap:function(){
    wx.navigateTo({
      url: '/pkg_pz/pages/Pzyuyue/Pzyuyue',
    })
  },
  

  //店铺众筹明细
  toShopRaise: function () {
    wx.navigateTo({
      url: '/pkg_shop/pages/shopRaise/shopRaise',
    })
  },

  //优惠券
  toYHInfo: function () {
    if (this.data.IsLogin) {
      wx.navigateTo({
        url: '/pkg_wo/pages/vipInfo/vipInfo',
      })
    } else {
      wx.showToast({
        title: '请先登录！', // 提示的内容
        icon: "none", // 图标，默认success
        duration: 3000, // 提示的延迟时间，默认1500
        mask: false, // 是否显示透明蒙层，防止触摸穿透
      })
    }
  },


  //亮证
  bindClosePaper: function () {
    // this.setData({
    //   hiddenSharePaper: !this.data.hiddenSharePaper,
    // })

    wx.previewImage({
      urls: ['https://insurancecard.oneplusyang.com/202311231529255b55eecb45eb46d5afb5beddc5cb18cf.png'], //需要预览的图片http链接列表，注意是数组
      current: '', // 当前显示图片的http链接，默认是第一个
      success: function (res) {},
      fail: function (res) {},
      complete: function (res) {},
    })

  },


  onLineAction(){
    wx.showToast({
      title: '开发中，即将上线！', // 提示的内容
      icon: "none", // 图标，默认success
      duration: 3000, // 提示的延迟时间，默认1500
      mask: false, // 是否显示透明蒙层，防止触摸穿透
    })
  }
})